package cn.codesugar.videocache

import android.os.Bundle
import androidx.fragment.app.FragmentActivity
import cn.codesugar.videocache.databinding.ActivitySingleVideoBinding

class SingleVideoActivity : FragmentActivity() {

    private lateinit var binding: ActivitySingleVideoBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivitySingleVideoBinding.inflate(layoutInflater)
        setContentView(binding.root)
        supportFragmentManager.beginTransaction()
            .add(binding.containerView.id, VideoFragment("https://codesugar.cn/res/%E5%A5%A5%E8%BF%AAA4.mp4"))
//            .add(binding.containerView.id, VideoFragment("/storage/emulated/0/Android/data/cn.codesugar.videocache/cache/video-cache/acaac92b88d06e0399c68aa1d30bfe0e.mp4"))
            .commitAllowingStateLoss()
    }
}